<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h3>
        库存调整查看
    </h3>
</section>
<section class="content">
    <form id="adjustForm" method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body">
                        <div class="row">
                            <div class="col-md-6">
                                <h4 class="text-center" style="margin-bottom: 30px">调整前</h4>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">物料描述</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.matNameDesc}]]
                                    </div>
                                    <div th:if="${advivetow != null}" class="col-sm-10">
                                        [[${advivetow.adjMatDesc}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">在库数量</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        [[${adjust.adjBeforeNum}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        [[${advive.adjBeforeNum}]]
                                    </div>
                                    <label class="col-sm-2 text-right">在库重量</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        [[${adjust.adjBeforeWeight}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        [[${advive.adjBeforeWeight}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">可用数量</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        [[${adjust.adjBeforeAvaNum}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        [[${advive.adjBeforeAvaNum}]]
                                    </div>
                                    <label class="col-sm-2 text-right">可用重量</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        [[${adjust.adjBeforeAvaWeight}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        [[${advive.adjBeforeAvaWeight}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">单价</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        [[${adjust.adjBeforePrice}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        [[${advive.adjBeforePrice}]]
                                    </div>
                                    <label class="col-sm-2 text-right">金额</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        [[${adjust.adjBeforeAmount}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        [[${advive.adjBeforeAmount}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">跟踪号</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjTrackCode}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjTrackCode}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">特殊说明</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjSpec}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjSpec}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">项目编号</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjProjectCode}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjProjectCode}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">项目名称</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjProjectName}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjProjectName}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">在库类型</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjInType == 1 ? '库存' : '项目'}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjInType == 1 ? '库存' : '项目'}]]
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <h4 class="text-center" style="margin-bottom: 30px">调整后</h4>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">物料描述</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        <span th:class="${adjust.matNameDesc != adjust.adjMatDesc ? 'label label-danger' : ''}" th:text="${adjust.adjMatDesc}"></span>
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        <span th:class="${advivetow.adjMatDesc != advive.adjMatDesc ? 'label label-danger' : ''}" th:text="${advive.adjMatDesc}"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">在库数量</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        <span th:class="${adjust.adjBeforeNum != adjust.adjAfterNum ? 'label label-danger' : ''}" th:text="${adjust.adjAfterNum}"></span>
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        <span th:class="${advive.adjBeforeNum != advive.adjAfterNum ? 'label label-danger' : ''}" th:text="${advive.adjAfterNum}"></span>
                                    </div>
                                    <label class="col-sm-2 text-right">在库重量</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        <span th:class="${adjust.adjBeforeWeight != adjust.adjAfterWeight ? 'label label-danger' : ''}" th:text="${adjust.adjAfterWeight}"></span>
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        <span th:class="${advive.adjBeforeWeight != advive.adjAfterWeight ? 'label label-danger' : ''}" th:text="${advive.adjAfterWeight}"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">可用数量</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        [[${adjust.adjAfterAvaNum}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        [[${advive.adjAfterAvaNum}]]
                                    </div>
                                    <label class="col-sm-2 text-right">可用重量</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        [[${adjust.adjAfterAvaWeight}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        [[${advive.adjAfterAvaWeight}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">单价</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        <span th:class="${adjust.adjBeforePrice != adjust.adjPrice ? 'label label-danger' : ''}" th:text="${adjust.adjPrice}"></span>
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        <span th:class="${advive.adjBeforePrice != advive.adjPrice ? 'label label-danger' : ''}" th:text="${advive.adjPrice}"></span>
                                    </div>
                                    <label class="col-sm-2 text-right">金额</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        <span th:class="${adjust.adjBeforeAmount != adjust.adjAmount ? 'label label-danger' : ''}" th:text="${adjust.adjAmount}"></span>
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        <span th:class="${advive.adjBeforeAmount != advive.adjAmount ? 'label label-danger' : ''}" th:text="${advive.adjAmount}"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">跟踪号</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        [[${adjust.adjTrackCode}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        [[${advive.adjTrackCode}]]
                                    </div>
                                    <label class="col-sm-2 text-right">制单人</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        [[${adjust.adjPerson}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        [[${advive.adjPerson}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">特殊说明</label>
                                    <div th:if="${adjust != null}" class="col-sm-2">
                                        [[${adjust.adjSpec}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-2">
                                        [[${advive.adjSpec}]]
                                    </div>
                                    <label class="col-sm-2 text-right">制单时间</label>
                                    <div th:if="${adjust != null}" class="col-sm-4">
                                        [[${#dates.format(adjust.adjDate,'yyyy-MM-dd')}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-4">
                                        [[${#dates.format(advive.adjDate,'yyyy-MM-dd')}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">项目编号</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjProjectCode}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjProjectCode}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">项目名称</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjProjectName}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjProjectName}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">在库类型</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjInType == 1 ? '库存' : '项目'}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjInType == 1 ? '库存' : '项目'}]]
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 text-right">调整原因</label>
                                    <div th:if="${adjust != null}" class="col-sm-10">
                                        [[${adjust.adjReason}]]
                                    </div>
                                    <div th:if="${advive != null}" class="col-sm-10">
                                        [[${advive.adjReason}]]
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-footer">
                        <div class="row">
                            <div class="col-md-11 col-lg-offset-1" style="margin-bottom: 20px">
                                <label>&nbsp;&nbsp;&nbsp;&nbsp;审核意见：</label>
                                <span th:if="${check.adjStatus == 4}">同意</span>
                                <span th:if="${check.adjStatus == 5}">不同意</span>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-11 col-lg-offset-1" style="margin-bottom: 20px">
                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;审核人：</label>
                                <span th:text="${check.adjAuditor}"></span>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-11 col-lg-offset-1" style="margin-bottom: 20px">
                                <label>&nbsp;&nbsp;&nbsp;&nbsp;审核时间：</label>
                                <span th:text="${#dates.format(check.adjAuditDate, 'yyyy-MM-dd hh:mm:ss')}"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</section>

<div th:include="include :: footer"></div>
</body>
</html>